import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, DeleteDateColumn, UpdateDateColumn } from 'typeorm';

@Entity()
export class userLog {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  userId: number;

  @Column()
  username: string;

  @Column()
  method: string;

  @Column()
  path: string;

  @Column()
  ip: string;

  //设备
  @Column()
  device: string;

  //系统版本
  @Column()
  os: string;

  //浏览器版本
  @Column()
  browser: string;

  @Column()
  status: number;

  @Column('text')
  errDetail: string;

  @CreateDateColumn()
  uploadTime: Date;

  @DeleteDateColumn({ select: false })
  deleteTime: Date;

  @UpdateDateColumn()
  updateTime: Date;

}